from django.contrib import admin
from pagemagic.admin import PageAdmin, ExtensionAdmin
from pagemagic.models import Page
from models import ContentAttrs, MenuItemAttrs

class MenuItemAttrsInlineAdmin(ExtensionAdmin):
    model = MenuItemAttrs

class ContentAttrsInlineAdmin(ExtensionAdmin):
    model = ContentAttrs

class ExtendedPageAdmin(PageAdmin):
    inlines = [
        MenuItemAttrsInlineAdmin,
        ContentAttrsInlineAdmin,
    ]

admin.site.unregister(Page)
admin.site.register(Page, ExtendedPageAdmin)
